var rule = new Rule{ ObjectID = "Promote Harry Potter Box Set", Condition = new Condition { Anchoring = "contains", Pattern = "Harry Potter" }, Consequence = new Consequence { Promote = new List<ConsequencePromote> { new ConsequencePromote { ObjectID = "HP-12345", Position = 0 } } }};index.SaveRule(rule);// Asynchronousawait index.SaveRuleAsync(rule);
You’ve placed “best-selling items” at the top of your search results by using Custom Ranking. But the newest release? Set up a Rule telling the engine that whenever iPhone is searched for, place the newest version at the top, but for the rest of the same brand phones, continue sorting by most-sold.
You’re running a promotion on the newest Apple products. Set up a Rule telling the engine that whenever apple is searched for, place the newest releases at the top.
Tomato: A simple search, but one that may never return the fruit (or vegetable) because too many Tomato Soup brands are selling better than cherry tomatoes.